//
//  ListTHeaderView.m
//  CBAnyViewPlaceHolder
//
//  Created by Creater on 2018/10/12.
//  Copyright © 2018 Creative Bomb. All rights reserved.
//

#import "ListTHeaderView.h"

@implementation ListTHeaderView


- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor colorWithWhite:0.98 alpha:1.0];
        _lblTitle = [UILabel new];
        _lblTitle.text = @"Hello, I'am header title";
        _lblTitle.font = [UIFont systemFontOfSize:18.0 weight:UIFontWeightBold];
        _lblTitle.textColor = UIColor.orangeColor;
        [self.contentView addSubview:_lblTitle];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [_lblTitle sizeToFit];
    [_lblTitle setFrame:CGRectMake(16.0, (self.contentView.bounds.size.height - _lblTitle.bounds.size.height) / 2.0, self.contentView.bounds.size.width - 32.0, 20.0)];
}

@end
